package unmutecollection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.testng.annotations.Test;

/**
 *
 */
public class Unmute1 {

    private List<String> strlist = Collections.emptyList();

    public List<String> getStrlist() {
        return strlist;
    }

    public void setStrlist(List<String> strlist) {
        this.strlist = strlist;
    }

    @Test
    private void t1() {
        var list = new ArrayList<String>();
        list.add("a");
        setStrlist(list);

        System.out.println(strlist);

//        strlist.add("a");

//        List<Integer> list = Collections.emptyList();
//        list.add(7);
//
//        list.remove(7);
    }

    @Test
    private void t2() {
        var list = new ArrayList<>(strlist);
        list.add("b");

        var list2 = strlist;
        list2.add("c");
    }
}
